Unit 3 Exercise 11
Exercise 11: Instance Properties
Objective
To use different types of Instance Properties in place of hard coded values in the command line.
Summary
Modify Windows Job 4 to use Schedule and Job Instance Properties for the Path
and -t
parameter. Within MY FIRST SCHEDULE, you will create a Schedule Instance Property called Path
with a value of C:\Program Files\OpConxps\MSLSAM
. Within Windows Job 4, you will create a Job Instance Property called TIME
with a numerical value of your choosing.
Instructions
Create the Schedule Instance Property
- In Library > Administration, select Master Schedules.
- In the Schedule list, select My First Schedule.
- Click the Edit button.
- Click the Lock icon in the upper right-hand corner.
- Expand the Instance Definition box
- Click the Add New Property Set button.
- In the Name text box, type
Path
. - In the Value text box, type
C:\Program Files\OpConxps\MSLSAM
. - Click the Check Mark button to verify the the entry.
- Click the Save button.
- Close Studio.
Create the Job Instance Property
- Under Library > Administration, select Master Jobs.
- In the Master Jobs list, select Windows Job 4.
- While holding down the CTRL key, click the Edit button and the job should open in a new tab.
- In the new tab, click the Lock button in the upper right-hand corner.
- Expand Instance Properties.
- Click + Add New Property Set button.
- Click the green + button.
- In the Name field, enter
TIME
. - In the Value field, enter a number of your choice between 10 and 60.
- Click the Check Mark button to verify the the entry.
- click Save.
- Refresh the web page.
Modify the Job to use the Instance Properties
- While still on the Master Job Definition screen for Windows Job 4, click the Lock** button in the upper right-hand corner.
- Expand the Task Details box.
- Locate the Command Line and highlight
C:\Program Files\OpConxps\MSLSAM
. - Using either, the Magic Wand or CTRL+SPACE, pull up the Property Selector window.
- In the Property Selector pop-up window:
- In the Scope field, uncheck Global, Job, and Machine.
- In the Search field, enter
Path
. - Select the Property named, SI.Path.
- Click OK
- Repeat Steps 17-19 to replace the
10
with the Job Instance Property called JI.TIME.
tip
The new command line should look similar to the following:
"[[SI.Path]]\genericp.exe" –t[[JI.TIME]]
- Click Save.
- Close Library.
Build the Schedule
tip
Validate that all the jobs in My First Schedule are in a completed state and that the Schedule Status shows as Completed. As you may need to overwrite the existing schedule during the build process.
- In Operations, click on Schedule Build.
- In the From field, select today's date.
- In the To field, select today's date.
- Select the Released radio button.
- Toggle on the Overwrite Exsisting switch
- In the Schedule List, select My First Schedule.
- Click the Build button.
- Expand and click on the schedule link for My First Schedule to return to the Processes screen.
Enterprise Manager
Details
- Under the Administration topic, double click on Schedule Master.
- In the Schedule Selection drop-down menu select My First Schedule.
- Click the Instance Definition tab under Schedule Details.
- In the Define Property Values text box, type
Path=C:\Program Files\OpConxps\MSLSAM
. - Click the Add button to the right of the Define Property Values text box.
- Click the Save button on the Schedule Master toolbar.
- Close the Schedule Master.
- Under the Administration topic, double click on Job Master.
- In the Schedule drop-down list, select My First Schedule.
- In the Job drop-down list, select Windows Job 4.
- Update your command line to use the new properties by placing Properties to point to the Machine or Schedule Instance Properties instead of the Global Properties:
“[[PathWindows]]\genericp.exe” –t[[RUNTIME]] –e0
to:
"[[SI.Path]]\genericp.exe” –t[[JI.Time]] –e0
- Click the Save button.
- In the Instance Definition tab, enter
TIME=XX
, where XX is a number of your choosing between 10 and 60. - Click Add
- Click Save.
- If My First Schedule is In Process, Cancel all jobs.
- Rebuild My First Schedule Released for today
- Release Windows Job 1 and Windows Job 2.
- Check the results from Enterprise Manager (check the Job Information> Configuration> Token Replacement Values for Windows Job 4).